In a RAID (Redundant Array of Inexpensive Disks) device, when power failure of an external power supply has occurred, data is transferred from a cache memory to be written to a disk drive using a battery power supply for backup in order to prevent data on the cache memory from being lost.
However, when a charge capacity of a battery power supply is insufficient at the time of the power failure, the RAID device fails to backup the data on the cache memory causing data loss. In order to prevent the data loss, a RAID controller which controls the RAID device always monitors the charge capacity of the battery power supply via a monitoring equipment to determine whether the charge capacity required for rewriting all of data on the cache memory is secured.
When the charge capacity of the battery power supply is greater than or equal to the capacity required for the cache memory backup, the RAID device operates in a write back mode. The write back mode is an operation mode in which the RAID device informs a host of the completion of a write command at the time when the write command is received from the host. In the meantime, when the charge capacity of the battery power supply is less than the capacity required for the cache memory backup, the RAID device operates in a write through mode. The write through mode is an operation mode in which even when the RAID device has received the command from the host, the RAID device does not inform the host of the completion of the write command until the data of the cache memory is transferred to be written into the disk drive. Therefore, when the RAID device operates in the write through mode, the performance of completion response of the write command to the host is remarkably reduced.
When the battery power supply is discharged due to a certain cause and the capacity of the battery power supply becomes less than the capacity required for the backup, the RAID device shifts to the write through mode and thus, reduction of the performance occurs. Thereafter, when the battery power supply is recharged and the capacity required for the backup is charged, the RAID device returns to the write back mode. Accordingly, when the capacity of battery power supply may be accurately assessed, the performance of the RAID device may be enhanced.
The causes of discharge of the battery power supply may include a case where the backup is performed due to power failure and a case where self-discharge occurs during stopping of charge of the battery by, for example, disconnection of a power supply of the RAID device. In the case where the backup is performed due to the power failure, since the monitoring equipment may monitor a discharge power and discharge time period of the battery power supply, a discharge capacity may be easily specified and the RAID device may assess the charge capacity after discharge. In the meantime, in the case of the self-discharge, since the monitoring equipment is also stopped during the disconnection of the power supply, the RAID device is not able to assess the charge capacity after the self-discharge.
Therefore, a method has been known in which, for example, an initial value of charging ratio obtained from a battery voltage at the time of system startup and an initial value of charging ratio that was stored at the time when the previous activation is ended are selected based on a battery stop time to assess the charge capacity at the time of the system startup.
However, the accuracy of charge capacity diagnosis at the time of reactivation is not sufficient, which is problematic. For example, even when the values of the battery voltage at the time of the system startup are the same, actual charge capacities may be different from each other due to, for example, a battery charge state before the disconnection of the power supply or a state (e.g., a time period and temperature) at the time of the disconnection of the power supply. In the charge capacity diagnosis at the time of the reactivation, the charge capacity is calculated for a case where the strictest condition is applied to the battery voltage at the time of the system startup. This is because the RAID device intends to avoid the data loss from occurring due to the failure of data backup during the power failure. Accordingly, a disparity occurs between the charge capacity calculated by the charge capacity diagnosis at the time of the reactivation and the actual charge capacity. That is, the accuracy of diagnosis becomes deteriorated in the diagnosis of charge capacity at the time of the reactivation.
Such a problem will be described with reference to FIG. 7. FIG. 7 is a view explaining about a charge capacity at the time of the reactivation. Here, it is assumed that the battery power supply was charged with 100% of charge capacity at the time when the power supply is disconnected. As illustrated in FIG. 7, the battery power supply is discharged by the disconnection of the power supply. In the meantime, even when the actual charge capacity was 60% (C2) at the time when the power was supplied and the battery power supply was reactivated, since the strictest condition is applied to the battery voltage at the time of the system startup, the charge capacity is calculated as 20% (C1) in the charge capacity diagnosis. As a result, a time period spanning from the time of reactivation to a time at which the calculated charge capacity reaches the charge capacity of C2 by the charge capacity diagnosis performed continuously is required. When the charge capacity C2 is set as a boundary at which the write back mode is possible, the RAID device is allowed to be operated at the write through mode, thereby causing degradation in performance.
Further, the problem occurs in the RAID device as well as the entire battery power supply.
The following are reference documents.
[Document 1] Japanese Laid-Open Patent Publication No. 2008-145349,
[Document 2] Japanese Laid-Open Patent Publication No. 2009-139184,
[Document 3] Japanese Laid-Open Patent Publication No. 2001-56362 and
[Document 4] Japanese Laid-Open Patent Publication No. 07-160433.